import {
  IsNotEmpty,
  IsNumber,
  IsEmail,
  IsString,
  IsPhoneNumber,
} from 'class-validator';
export class UpdateUserDto {
  @IsNotEmpty({ message: 'id不能为空' })
  @IsNumber()
  id: number;

  @IsNotEmpty({ message: '用户名不能为空' })
  @IsString()
  username: string;

  @IsNotEmpty({ message: '昵称不能为空' })
  @IsString()
  nickname: string;

  @IsEmail()
  @IsNotEmpty({ message: '邮箱不能为空' })
  email: string;

  @IsNotEmpty({ message: '头像不能为空' })
  @IsString()
  avatar: string;

  @IsNotEmpty({ message: '手机号不能为空' })
  @IsPhoneNumber('CN')
  phone: string;
}
